<template>
  <page-body>
    <view class="page">
      <view class="flex benben-position-layout flex flex-wrap align-center mylike_flex_0"
        :style="{height:(88+StatusBarRpx)+'rpx',paddingTop:StatusBarRpx+'rpx', }">
        <view class='flex flex-wrap align-center justify-between flex-sub mylike_fd0_0'>
          <view class='flex flex-wrap align-center mylike_fd0_0_c0' @tap.stop="handleJumpDiy" data-type="back"
            data-url="1">
            <text class='fu-iconfont2  mylike_fd0_0_c0_c0'>&#xE794;</text>
          </view>
          <view class='flex flex-wrap align-stretch justify-center'>
            <text class='mylike_fd0_0_c1_c0'>我的点赞</text>
          </view>
          <view class='flex flex-wrap align-center justify-end mylike_fd0_0_c0'>
          </view>
        </view>

      </view>
      <view :style="{height: (88+StatusBarRpx)+'rpx'}"></view>
      <!---反馈记录带联系人flex布局开始-->
      <view class="flex flex-direction flex-wrap align-stretch benben-flex-layout">
        <template v-for='(item,key0) in dataMessage'>
          <view class='flex flex-wrap align-start mylike_fd1_0' :key='key0' @tap.stop="handleJumpDiy"
            data-type="navigateTo" :data-url="`/pages/homePage/dongDetail/dongDetail?id=${item.aid}`">
            <image class='mylike_fd1_0_c0' mode="aspectFill" :src='item.avatar'
              @tap.stop="singleImagePreview(item.avatar)"></image>
            <view class='flex flex-direction flex-wrap align-stretch flex-sub mylike_fd1_0_c1'>
              <view class='flex flex-wrap align-center justify-between mylike_fd1_0_c1_c0'>
                <view class='flex flex-direction flex-wrap align-stretch mylike_fd1_0_c1_c0_c0'>
                  <text class='mylike_fd1_0_c1_c0_c0_c0'>{{item.user_name}}</text>
                  <view class='flex flex-wrap align-center mylike_fd1_0_c1_c0_c0_c1'>
                    <text>{{item.company_name}}</text>
                    <text class='mylike_fd1_0_c1_c0_c0_c1_c1'>{{item.zhiye}}</text>
                  </view>
                </view>
              </view>
              <view class='flex flex-direction flex-wrap align-stretch mylike_fd1_0_c1_c1'>
                <view class='flex-sub mylike_fd1_0_c1_c1_c0'>
                  <text class='mylike_fd1_0_c1_c1_c0_c0'>{{item.title}}</text>
                </view>
              </view>
              <view class='flex flex-wrap align-center mylike_fd1_0_c1_c2' v-if="item.postType=='image'">
                <template v-for='(child,key1) in item.thumb'>
                  <view class='flex flex-wrap align-center mylike_fd1_0_c1_c2_c0' :key='key1'>
                    <image class='mylike_fd1_0_c1_c2_c0_c0' mode="aspectFill" :src='child'
                      @tap.stop="multiImagePreview(child,item.thumb,'')"></image>
                  </view>
                </template>
              </view>
              <view class='flex flex-wrap align-center mylike_fd1_0_c1_c2' v-if="item.postType=='video'">
                <view class='flex flex-wrap align-center mylike_fd1_0_c1_c2_c0 position-relative'>
                  <image class='mylike_fd1_0_c1_c2_c0_c0' mode="aspectFill" :src='item.video_img'></image>
                  <image class='playd' mode="aspectFit" :src='STATIC_URL+"playd.png"'></image>
                </view>
              </view>
              <view class='flex flex-wrap align-center mylike_fd1_0_c1_c3'>
                <!-- <text class='mylike_fd1_0_c1_c3_c0'>{{item.create_time}}</text> -->
                <!-- <text class='mylike_fd1_0_c1_c3_c1'>{{item.create_time}}</text> -->
              </view>
              <view class='flex flex-wrap align-center justify-between mylike_fd1_0_c1_c4'>
                <!-- <view class='flex flex-wrap align-center'>
                  <image class='mylike_fd1_0_c1_c4_c0_c0' mode="aspectFit" :src='STATIC_URL+"158.png"'></image>
                  <text class='mylike_fd1_0_c1_c4_c0_c1'>{{item.share_count }}</text>
                </view> -->
                <text class='mylike_fd1_0_c1_c4_c0_c1'>{{item.create_time }}</text>
                <view class='flex flex-wrap align-center'>
                  <image class='mylike_fd1_0_c1_c4_c0_c0' mode="aspectFit" :src='STATIC_URL+"159.png"'></image>
                  <text class='mylike_fd1_0_c1_c4_c0_c1'>{{item.comment_count }}</text>
                </view>
                <view class='flex flex-wrap align-center' @click.stop="like(item)">
                  <image class='mylike_fd1_0_c1_c4_c0_c0' v-if="item.isLike==1" mode="aspectFit"
                    :src='STATIC_URL+"161.png"'></image>
                  <image class='mylike_fd1_0_c1_c4_c0_c0' v-if="item.isLike==0" mode="aspectFit"
                    :src='STATIC_URL+"189.png"'></image>
                  <text class='mylike_fd1_0_c1_c4_c0_c1'>{{item.like_count }}</text>
                </view>
              </view>
            </view>
          </view>
        </template>
        <fu-empty :pagingListLoadedAll="pagingListLoadedAll" :pagingListNoListData="pagingListNoListData"
          :listDataLength="listDataLength" :isLoadInit="isLoadInit"></fu-empty>
      </view>

      <!---反馈记录带联系人flex布局结束-->


    </view>
  </page-body>
</template>
<script>
  import pagingList from '@/common/mixin/paging_list.js';
  import {
    validate
  } from '@/common/utils/validate.js'

  export default {
    components: {},
    mixins: [pagingList],

    data() {
      return {
        "minixPagingListsApi": "",
        "pageingListApiMethod": "",
        "allowOnloadGetList": false,
        "dataMessage": []
      };
    },
    computed: {

    },
    watch: {},
    onLoad(options) {
      this.getListFunc()
    },
    onUnload() {

    },
    onReady() {

    },
    onShow() {

    },
    onHide() {

    },
    onResize() {

    },
    onPullDownRefresh() {

    },
    onReachBottom(e) {

    },
    onPageScroll(e) {

    },
    methods: {
      like(item) {
        this.$api.post(global.apiUrls.post6459b3da18828, {
          post_id: item.aid
        }).then(res => {
          if (res.data.code == 1) {
            if (item.isLike == 1) {
              item.isLike = 0
              item.like_count = item.like_count - 1
            } else {
              item.isLike = 1
              item.like_count = item.like_count + 1
            }
            console.log(item.isLike)
          } else {
            this.$message.info(res.data.msg)
          }
        })
      },
      //用户管理-意见反馈记录
      getListFunc() {
        this.minixPagingListsApi = global.apiUrls.post665154d4b1159;
        this.pageingListApiMethod = 'get';
        this.allowOnloadGetList = false;
        this.pagingListPostDataContent = {
          user_type: '1'
        }
        this.listData = [];
        this.dataMessage = this.listData;
        this.pagingListToggle();

      },
      pagingListPostData() {
        return this.pagingListPostDataContent
      }
    }
  };
</script>
<style lang="scss" scoped>
  .playd {
    width: 60rpx;
    height: 60rpx;
    position: absolute;
    top: 33%;
    left: 33%;
  }

  .page {
    width: 100vw;
    overflow-x: hidden;
    min-height: calc(100vh - var(--window-bottom));
    background: #F8F8F8;
    background-size: 100% auto;
  }

  .mylike_flex_0 {
    border-bottom: 1px solid #eee;
    background: #fff;
    width: 750rpx;
    height: 88rpx;
    overflow: hidden;
    z-index: 10;
    top: 0rpx;
    background-size: 100% auto !important;
  }

  .mylike_fd0_0_c1_c0 {
    font-size: 36rpx;
    font-weight: 700;
    color: #333333;
    line-height: 50rpx;
  }

  .mylike_fd0_0_c0_c0 {
    font-size: 36rpx;
    color: #333;
  }

  .mylike_fd0_0_c0 {
    width: 120rpx;
  }

  .mylike_fd0_0 {
    padding: 0rpx 32rpx 0rpx 32rpx;
  }

  .mylike_fd1_0_c1_c4_c0_c1 {
    color: var(--benbenFontColor2);
  }

  .mylike_fd1_0_c1_c4_c0_c0 {
    width: 32rpx;
    height: 32rpx;
    border-radius: 0rpx 0rpx 0rpx 0rpx;
    margin: 0rpx 12rpx 0rpx 0rpx;
  }

  .mylike_fd1_0_c1_c4 {
    margin: 24rpx 0rpx 0rpx 0rpx;
  }

  .mylike_fd1_0_c1_c3_c1 {
    line-height: 33rpx;
    font-size: 24rpx;
    font-weight: 400;
    color: var(--benbenFontColor2);
    margin: 0rpx 0rpx 0rpx 24rpx;
  }

  .mylike_fd1_0_c1_c3_c0 {
    line-height: 33rpx;
    font-size: 24rpx;
    font-weight: 400;
    color: var(--benbenFontColor2);
  }

  .mylike_fd1_0_c1_c3 {
    margin: 12rpx 0rpx 0rpx 0rpx;
  }

  .mylike_fd1_0_c1_c2_c0_c0 {
    width: 180rpx;
    height: 180rpx;
    border-radius: 16rpx 16rpx 16rpx 16rpx;
  }

  .mylike_fd1_0_c1_c2_c0 {
    margin: 12rpx 8rpx 12rpx 0rpx;
  }

  .mylike_fd1_0_c1_c2 {
    // padding: 12rpx 0rpx 0rpx 8rpx;
  }

  .mylike_fd1_0_c1_c1_c0_c0 {
    line-height: 46rpx;
    font-size: 32rpx;
    font-weight: 400;
    color: var(--benbenFontColor0);
    padding: 0rpx 30rpx 0rpx 0rpx;
  }

  .mylike_fd1_0_c1_c1_c0 {
    color: rgba(119, 119, 119, 1);
  }

  .mylike_fd1_0_c1_c1 {
    position: relative;
    padding: 0rpx 0rpx 0rpx 16rpx;
  }

  .mylike_fd1_0_c1_c0_c0_c1_c1 {
    color: var(--benbenFontColor2);
    margin: 0rpx 0rpx 0rpx 24rpx;
  }

  .mylike_fd1_0_c1_c0_c0_c1 {
    font-size: 28rpx;
    margin: 06rpx 0rpx 0rpx 0rpx;
  }

  .mylike_fd1_0_c1_c0_c0_c0 {
    font-weight: 600;
    font-size: 36rpx;
  }

  .mylike_fd1_0_c1_c0_c0 {
    margin: 0rpx 0rpx 0rpx 16rpx;
  }

  .mylike_fd1_0_c1_c0 {
    margin: 0rpx 0rpx 12rpx 0rpx;
  }

  .mylike_fd1_0_c1 {
    margin: 0rpx 0rpx 0rpx 0rpx;
  }

  .mylike_fd1_0_c0 {
    width: 80rpx;
    height: 80rpx;
    border-radius: 16rpx;
  }

  .mylike_fd1_0 {
    background: var(--benbenbgColor1);
    padding: 24rpx;
    width: 702rpx;
    margin: 24rpx auto 0 auto;
    background-size: 100% auto;
    border-radius: 16rpx;
  }
</style>
